<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:m="http://www.ol4jsf.org"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<table width="95%" cellspacing="10px">
		<tr valign="top" align="center">
			<td width="50%">
				<rich:panel style="width:360px">
					<h:form>
						<m:map id="mapEditor" width="350px" height="350px" options="#{parcelQueryHelper.mapOptions}" jsVariable="mapEditor">
							<m:wmsLayer
								name="Centroides de predio"
								url="#{generalHelper.wmsUrl}"
								params="{layers: '#{generalHelper.primaryWMSLayer}', transparent: true, format: 'image/png'}"
								options="{ isBaseLayer: true, projection: '#{generalHelper.workingSRS}' }">
							</m:wmsLayer>
							<m:vectorLayer name="Editable" jsVariable="vlayer"/>
							<m:vectorLayer name="parcelFeaturesLayer" jsVariable="parcelFeaturesLayer" />
							<m:navigationControl />
							<m:panZoomBarControl />
							<m:layerSwitcherControl options="{ascending:false, useLegendGraphics:true}"/>
							<m:scaleLineControl />
							<m:mousePositionControl />
							<m:overviewMapControl />
							<m:panelControl>
								<m:navigationControl options="{title:'You can use the default mouse configuration'}"/>
								<m:zoomBoxControl options="{title:'Zoom box: Selecting it you can zoom on an area by clicking and dragging.'}" jsVariable="zb"/>
								<m:zoomToMaxExtentControl options="{title:'Zoom to the max extent'}" />
							</m:panelControl>
							<m:script>#{parcelQueryHelper.mapScript('mapEditor')}</m:script>
						</m:map>
					</h:form>
				</rich:panel>
			</td>
			<td width="50%">
				<strong>Datos Generales</strong>
				<rich:separator lineType="solid"/>
				<br />
				<h:panelGrid columns="2">
					<h:outputText value="Ficha de Campo" style="font-weight:bold;" />
					<h:outputText value="#{parcel.fieldTab != null ? parcel.fieldTab : '(sin ficha de campo)'}" />
			
					<h:outputText value="Clave Municipal" style="font-weight:bold;" />
					<h:outputText value="#{parcel.municipalKey != null ? parcel.municipalKey : '(sin clave municipal)'}" />
			
					<h:outputText value="Clave Catastral" style="font-weight:bold;" />
					<h:outputText value="#{parcel.cadastralKey != null ? parcel.cadastralKey : '(sin clave catastral)'}" />
			
					<h:outputText value="Nombre" style="font-weight:bold;" />
					<h:outputText value="#{parcel.zoneName != null ? parcel.zoneName : '(sin nombre)'}" />
				</h:panelGrid>
				
				<br />
				<br />
				
				<strong>Vigencia</strong>
				<rich:separator lineType="solid"/>
				<br />
				<h:panelGrid columns="2">
					<h:outputText value="Vigente" style="font-weight:bold;" />
					<h:panelGroup>
						<h:outputText value="#{messages['txt.YES']}" rendered="#{parcel.alive}" />
						<h:outputText value="#{messages['txt.NO']}" rendered="#{not parcel.alive}" style="color:Red;" />
					</h:panelGroup>
					
					<h:outputText value="Comienzo vigencia" style="font-weight:bold;" />
					<h:outputText value="#{parcel.beginLifespanVersion}" />
					
					<h:outputText value="Fin de vigencia" style="font-weight:bold;" />
					<h:outputText value="#{parcel.endLifespanVersion}" />
				</h:panelGrid>
			</td>
		</tr>
	</table>
	<br />
	<br />
	

</ui:component>
